<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<title>内容分发系统管理端</title>
		<link rel="icon" href="favicon.ico" type="image/x-icon" />
		<link rel="stylesheet" href="/static/lib/layui/css/layui.css">
		<link rel="stylesheet" href="/static/css/style.css">
		<link rel="stylesheet" href="/static/lib/font-awesome/css/font-awesome.css">
	</head>
	<body>
		<div id="indexVue" class="layui-layout layui-layout-admin">
			<div class="layui-header">
				<img class="header-logo" src="/static/images/logo.png">
				<div class="header-notice" v-if="loadNotice">
				    <li><a target="BODY_FRAME" href="#"> 公告信息</a></li>
			        <ul v-for="(notice, index) in notices">
			            <li><a target="BODY_FRAME" href="#">{{notice.name}}</a></li>
			        </ul>
				</div>
			</div>
			<div class="layui-nav-user">
				<a target="BODY_FRAME" class="avatar" href="/profile.html">
					<#if admin.image?length &lt; 2>
						<img src="static/images/100.gif">
					<#else>
						<#if admin.image?starts_with('http')>
							<img src="${admin.image}">
						<#else>
							<img src="${imageHost}${admin.image}">
						</#if>
					</#if>
					<cite>${admin.realname}</cite>
				</a>
				<div class="nav" style="cursor: pointer;top: 0px;">
					<a id="exitButton"><i class="fa fa-power-off"></i>退出</a>
				</div>
			</div>
			<div id="leftFrame" class="layui-side layui-bg-black">
				<div class="layui-side-scroll">
					<ul class="layui-nav layui-nav-tree">
						<li class="layui-nav-item layui-nav-itemed">
							<a href="javascript:;">公共设置</a>
							<dl class="layui-nav-child">
						    	<dd class="nav-item">
                                    <a onclick="change('config/list.html')"> 
                                        <i class="fa fa-info-circle"></i> <cite>网站设置</cite>
                                    </a>
                                </dd>
						    	<dd class="nav-item">
									<a onclick="change('setting.html')"> 
										<i class="fa fa-sliders"></i> <cite>链接设置</cite>
									</a>
								</dd>
						    </dl>
						</li>
						<li class="layui-nav-item layui-nav-itemed">
							<a href="javascript:;">用户设置</a>
							<dl class="layui-nav-child">
								<dd class="nav-item">
									<a onclick="change('manager/list.html')"> 
										<i class="fa fa-address-card"></i> <cite>管理员</cite>
									</a>
								</dd>
								<dd class="nav-item">
									<a onclick="change('stock/message.html')"> 
										<i class="fa fa-paint-brush" style="width:18px;"></i><cite>操作日志</cite>
									</a>
								</dd>
							</dl>
						</li>
						<li class="layui-nav-item layui-nav-itemed">
							<a href="javascript:;">新闻公告</a>
							<dl class="layui-nav-child">
								<dd class="nav-item">
									<a onclick="change('news/list.html')"> 
										<i class="fa fa-newspaper-o"></i> <cite>网站新闻</cite>
									</a>
								</dd>
								<dd class="nav-item">
									<a onclick="change('notice/list.html')"> 
										<i class="fa fa-bullhorn" style="width:18px;"></i><cite>信息公告</cite>
									</a>
								</dd>
							</dl>
						</li>
					</ul>
				</div>
			</div>
			<div id="bodyFrame" class="layui-body" style="padding: 10px;">
				<iframe id="BODY_FRAME" name="BODY_FRAME" src="logs.html" frameborder="0" width="100%" height="99%"></iframe>
			</div>
			<div class="layui-footer" style="padding-top: 15px;height:30px;">
			  <center><p>2017 © <a href="http://ip.oschina.io/" target="_black">托管在开源中国</a></p></center>
			</div>
		</div>
		<script src="/static/lib/jquery-3.1.1.js"></script>
		<script src="/static/lib/vue.js"></script>
        <script src="/static/lib/layui/lay/dest/layui.all.js"></script>
        <script src="/static/js/main-index.js"></script>
		<script type="text/javascript">
		var indexVue = new Vue({
		    el: "#indexVue",
		    data: {
		        notices: [],
		        loadNotice: false,
		    },
		});
		function loadNotice() {
		    indexVue.loadNotice = false;
		    $.post("/notice/list.json").done(function(res){
		        if(res.code == 0) {
		            indexVue.notice = res.message.beans;
		            if(indexVue.loadNotice) indexVue.loadNotice = true;
		        }
		    });
		}
		loadNotice();
		</script>
	</body>
</html>
